package com.info.examples.authentication;

import org.springframework.web.client.RestTemplate;

import java.util.HashMap;
import java.util.Map;

public class AuthenticationTest {
    public static void main(String[] args) {
        RestTemplate template = new RestTemplate();
        Map<String, String> parameterMap = new HashMap<>(1 << 2);
        String name = "zhangsan";
        int age = 18;
        parameterMap.put("name", name);
        parameterMap.put("age", String.valueOf(age));
        String requestUrl = "http://localhost:8080/auth?name=" + name + "&age=" + age;
        final String result = template.getForObject(requestUrl, String.class, parameterMap);

    }
}
